package cn.sfrog.project.biz.admin.mapper;


import cn.sfrog.project.biz.admin.domain.BizDepartment;
import cn.sfrog.project.biz.admin.domain.vo.BizDepartmentQueryVO;
import cn.sfrog.project.biz.admin.domain.vo.BizDepartmentVO;
import cn.sfrog.project.biz.web.vo.index.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 科室Mapper接口
 */
public interface BizDepartmentMapper extends BaseMapper<BizDepartment> {
    /**
     * 查询科室
     *
     * @param id 科室主键
     * @return 科室
     */
    BizDepartmentVO selectBizDepartmentById(Long id);

    /**
     * 查询科室列表
     *
     * @param query 科室
     * @return 科室集合
     */
    List<BizDepartmentVO> selectBizDepartmentList(BizDepartmentQueryVO query);

    /**
     * APP-查询医院下的所有科室
     * @param hospitalId
     * @return
     */
    List<AppDepartmentResultVO> selectAppDepartmentListByHospitalId(@Param("hospitalId") Long hospitalId);

    /**
     * App-查询科室详情
     * @param id
     * @return
     */
    AppDepartmentDetailResultVO selectAppDepartmentDetail(@Param("id") Long id);

    List<AppDepartmentNameResultVO> selectAppAllDepartmentList();

    /**
     * 查询所有医院下的所有科室 （名称相同会去重）
     * @return
     */
    List<AppDepartmentNameResultVO> selectAppAllDepartmentListByCityCode(String cityCode);


    List<AppFirstDepartmentNameResultVO> getFirstDepartmentList(Long hospitalId);


    List<AppDepartmentNameResultVO> getSecondDepartmentList(AppDepartmentParentQueryVO parentQueryVO);
}
